package com.daohang.dh.manager.impl;

import com.daohang.dh.dao.MidpCusDetailsMapper;
import com.daohang.dh.entity.MidpCusDetailsEntity;
import com.daohang.dh.manager.MidpCusDetailsManager;
import net.chenlin.dp.common.entity.Page;
import net.chenlin.dp.common.entity.Query;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 客户信息表
 *
 * @author xiaomei
 * @email yczclcn@163.com
 * @url www.chenlintech.com
 * @date 2018/05/23
 */
@Component("midpCusDetailsManager")
public class MidpCusDetailsManagerImpl implements MidpCusDetailsManager {

	@Autowired
	private MidpCusDetailsMapper midpCusDetailsMapper;
	

	@Override
	public List<MidpCusDetailsEntity> listMidpCusDetails(Page<MidpCusDetailsEntity> page, Query search) {
		return midpCusDetailsMapper.listForPage(page, search);
	}

	@Override
	public int saveMidpCusDetails(MidpCusDetailsEntity midpCusDetails) {
		return midpCusDetailsMapper.save(midpCusDetails);
	}

	@Override
	public MidpCusDetailsEntity getMidpCusDetailsById(Long id) {
		MidpCusDetailsEntity midpCusDetails = midpCusDetailsMapper.getObjectById(id);
		return midpCusDetails;
	}

	@Override
	public int updateMidpCusDetails(MidpCusDetailsEntity midpCusDetails) {
		return midpCusDetailsMapper.update(midpCusDetails);
	}

	@Override
	public int batchRemove(Long[] id) {
		int count = midpCusDetailsMapper.batchRemove(id);
		return count;
	}
	
}
